<?php
declare (strict_types=1);

namespace app\index\controller;

use app\BaseController;
use app\common\controller\ServerResponse;
use app\model\Blogger_info;
use app\model\Ending;
use app\model\Food;
use app\model\Humor;
use app\model\Label;
use app\model\Music;
use app\model\Mystory;
use app\model\Nickname;
use app\model\Signature;
use app\model\Skill;
use app\model\Travel;
use app\model\Users;
use think\Request;

class Show extends ServerResponse
{
    //    展示博主信息 about.vue
    public function bloggerInfo()
    {
        $GLOBALS['adminid'] = 1;
//        return 1;
        $label = Label::where('adminid',$GLOBALS['adminid'])->select(); //获取我的标签
        $signature = Signature::where('adminid',$GLOBALS['adminid'])->select();//获取我的签名
        $travel = Travel::where('adminid',$GLOBALS['adminid'])->select();//获取我的足迹
        $skill = Skill::where('adminid',$GLOBALS['adminid'])->select();//获取我的技能
        $nickname = Nickname::where('adminid',$GLOBALS['adminid'])->select();//获取我的外号
        $ending = Ending::where('adminid',$GLOBALS['adminid'])->select();//获取结尾
        $food = Food::where('adminid',$GLOBALS['adminid'])->select();//获取我的食物
        $music = Music::where('adminid',$GLOBALS['adminid'])->select();//我的音乐
        $myStory= Mystory::where('adminid',$GLOBALS['adminid'])->select();//轻松时刻
        $humor = Humor::where('adminid',$GLOBALS['adminid'])->select();//轻松时刻
        $bloggerInfo = Blogger_info::where('adminid',$GLOBALS['adminid'])->select();//轻松时刻
        $data=['bloggerInfo'=>['desc'=>'我の情报','data'=>$bloggerInfo],'myStory'=>$myStory,'humor'=>$humor,'music'=>$music,'label'=>$label,'signature'=>$signature,'travel'=>$travel,'skill'=>$skill,'nickname'=>$nickname,'ending'=>$ending,'food'=>$food];
        return ServerResponse::jsonData(1,'请求成功！',$data);
    }

}
